<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="a_vuejs/vue.global.js"></script>

    <style>
        .ca{
            width: 100px;
            height: 100px;
            background-color: crimson;
        }
        .cb{
            width: 100px;
            height: 100px;
            background-color: yellow;
        }
    </style>

</head>
<body>

<div id="app">
    <div :class="{'ca':isA,'cb':!isA}" @click="isA=!isA">

    </div>
</div>

</body>

<script>
    Vue.createApp({
        data() {
            return {
                isA:true
            }
        },
        methods: {}
    }).mount("#app")
</script>

</html>